<?php
class CaptchaAjax extends CValidator {
	protected function validateAttribute($object,$attribute){
	    $code = Yii::app()->controller->createAction('captcha')->verifyCode;
	    if ($code != $object->$attribute)
	        $object->addError('verifyCode', Yii::t('msg', '0009'));
	}
}
?>